#pragma once

// AxGridCtrl.h : Declaration of the CAxGridCtrl ActiveX Control class.

#include "GridCtrl_src/GridCtrl.h"
#include "ContentParser.h"

// CAxGridCtrl : See AxGridCtrl.cpp for implementation.

class CAxGridCtrl
	: public COleControl
{
	DECLARE_DYNCREATE(CAxGridCtrl)

// Constructor
public:
	CAxGridCtrl();

// Overrides
public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	virtual BOOL PreTranslateMessage(MSG* pMsg);

// Implementation
protected:
	~CAxGridCtrl();

	DECLARE_OLECREATE_EX(CAxGridCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CAxGridCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CAxGridCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CAxGridCtrl)		// Type name and misc status

// Message maps
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT uMsg , int x, int y );
	afx_msg int OnMouseActivate(CWnd*, UINT, UINT);

	DECLARE_MESSAGE_MAP()

// Dispatch maps
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	enum {
		dispidContent = 1
	};

protected:
	BSTR GetContent(void);
	void SetContent(LPCTSTR newVal);

private:
	CGridCtrl m_GridCtrl;
	CStatic m_CopyRight;
	CFont m_font;
	CContentParser m_parser;
};

